﻿using UnityEngine;
using System.Collections;

public class Bullet : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

    void OnCollisionEnter(Collision col)
    {
        GameObject hit = col.gameObject;
        if(hit)
        {
            Health health = hit.GetComponent<Health>();
            if(health)
            {
                health.Hurt(10);
            }
            Destroy(gameObject);
        }
    }
}
